<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="js/vue.js"></script>
		
	</head>
	<body>
		<div id="app">
		<p v-show="age>=18">成年</p>
		<p v-show="age<18">未成年</p>
		
		<p v-if="age>=18">成年</p>
		<p v-if="age<18">未成年</p>
		
		<hr >
		<p v-if="salary<=10">普通阶层</p>
		<p v-else-if="salary<=500">中产阶层</p>
		<p v-else="salary>500">富豪阶层</p>
		
		
		<hr >
		<p v-for="o in hobby">{{o}}</p>
		<p v-for="o,i in hobby">{{i}}-{{o}}</p>
		
		<hr >
		<button v-on:click="show">青山</button>
		<button v-on:click="show()">青山</button>
		<button @click="show()">青山</button>
		
		<hr >
		<a v-bind:href="site.url">{{site.name}}</a><br>
		<a :href="site.url">{{site.name}}</a>
		
		<p v-text="sysname"></p>
		<p v-html="sysname"></p>
		<br><br><br><br>
		</div>
	</body>
	<script>
		new Vue({
			el: "#app",
			data: {
				sysname:"<b>京淘</b>电商平台",
				age: 16,
				salary:900,
				hobby:["篮球","看书","游戏"],
				site:{
					name:"java培优官网",
					url:"http://act.codeboy.com"
				}
			},
			methods:{
				show:function(){
					console.log("shoe method");
				}
			}
		});
	</script>
</html>
